package org.xdj.blue.java.io.client;

import java.util.Date;

/**
 * socket客户端启动demo
 * @author 91power—xdj
 *
 */
public class Client {

	/**
	 * @param args
	 * @throws Exception 
	 */
	public static void main(String[] args) throws Exception {
		clientStart();
		
	}

	/**
	 * demo-socket客户端启动method
	 * @throws InterruptedException
	 */
	private static void clientStart() throws InterruptedException{
		//创建客户端线程
		ClientSocket clientSocket = new ClientSocket("localhost", 9010);
		Thread client = new Thread(clientSocket);
		client.start();
		//客户端线程阻塞主线程，以便知道客户端线程何时结束
		client.join();
		System.out.println("---it's over---"+new Date()+"---");
		
	}
}
